<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%@ page import="entity.Payment" %>
<%@ page import="dao.PaymentDAO"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<base href="<%=basePath%>">
<title></title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>
</head>
<body>
<hr>
<form action="">
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder">收付情况</strong></div>	
 <table class="table table-hover text-center">
	<tr>
    	<td width="20%">合同编号</td><td width="20%">收付状态</td>
   		<td width="20%">合同总金额</td><td width="20%">已收付金额</td><td width="20%">操作</td>
   	</tr>
    <%
    	PaymentDAO payDAO=new PaymentDAO();
    

        ArrayList<Payment> list =payDAO.getAllPayment();
        if(list!=null&&list.size()>0){
			for(int i=0;i<list.size();i++)
			{
				Payment pay= list.get(i);
				pay.getPaystate();
				pay.getContractp();
				pay.getPayprice();
    %>

 <tr>
 
   	<td><%=pay.getCno()%></td>
    <td><%=pay.getPaystate()%></td>
    <td><%=pay.getContractp()%></td>
    <td><%=pay.getPayprice()%></td>
    <td><a href="payment_edit.jsp?cno=<%=pay.getCno()%>">更新收付</a></td>
    

  </tr>
   		 <%
                        }
        }
                %>
</table>

</div>
</form>

</body>
</html>